<?php
namespace app\admin\validate;

use think\Validate;

class StoreLink extends Validate
{
    protected $rule = [
        'name' => 'require|unique:StoreLink',
        'site' => 'require',
        'phone' => 'require|number|length:11',
        'sort'  => 'require|number'
    ];

    protected $message = [
        'name.require' => '请输入名称',
        'name.unique' => '名称重复',
        'site.require' => '请输入地址',
        'phone.require' => '请输入电话',
        'phone.number' => '电话格式错误',
        'phone.length' => '电话长度错误',
        'sort.require'  => '请输入排序',
        'sort.number'   => '排序只能填写数字'
    ];
}